package com.swak.consistency.reliablemsg.resolve;

import org.springframework.core.Ordered;

import com.swak.consistency.core.attribute.ConsistencyAttribute;
import com.swak.consistency.reliablemsg.context.ReliableMsgContext;

/**
 * 托底的获取方式
 * 
 * @author DELL
 */
public class DefReliableMsgContextResolver extends ReliableMsgContextResolver {

	@Override
	public ReliableMsgContext acquire(ConsistencyAttribute attribute) {
		return this.create(attribute);
	}

	@Override
	public ReliableMsgContext create(ConsistencyAttribute attribute) {
		return new ReliableMsgContext().as();
	}

	@Override
	public int getOrder() {
		return Ordered.LOWEST_PRECEDENCE;
	}
}